package com.etc.library.service.impl;

import com.etc.library.dao.CarouselMapper;
import com.etc.library.pojo.Carousel;
import com.etc.library.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarouselServiceImpl implements CarouselService {

    @Autowired
    private CarouselMapper carouselMapper;

    @Override
    public List<Carousel> list(Integer state) {
        return carouselMapper.list(state);
    }

    @Override
    public boolean update(Carousel carousel) {
        return carouselMapper.update(carousel)>0;
    }

    @Override
    public boolean del(Integer carouselId) {
        return carouselMapper.del(carouselId) >0;
    }
}
